package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ly.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.SaleOrderDeliveryDetailMapper;
import com.ly.heart.domain.SaleOrderDeliveryDetailEntity;
import javax.annotation.Resource;
import com.ly.heart.service.ISaleOrderDeliveryDetailService;

/**
 * 销售订单交货明细详情Service业务层处理
 * 
 * @author wutao
 * @date 2024-06-30
 */
@Service
public class SaleOrderDeliveryDetailServiceImpl extends ServiceImpl<SaleOrderDeliveryDetailMapper, SaleOrderDeliveryDetailEntity> implements ISaleOrderDeliveryDetailService {

    @Resource
    private SaleOrderDeliveryDetailMapper saleOrderDeliveryDetailMapper;

    /**
     * 查询销售订单交货明细详情
     * 
     * @param id 销售订单交货明细详情ID
     * @return 销售订单交货明细详情
     */
    @Override
    public SaleOrderDeliveryDetailEntity selectSaleOrderDeliveryDetailById(String id)
    {
        return saleOrderDeliveryDetailMapper.selectSaleOrderDeliveryDetailById(id);
    }

    /**
     * 查询销售订单交货明细详情列表
     * 
     * @param saleOrderDeliveryDetail 销售订单交货明细详情
     * @return 销售订单交货明细详情
     */
    @Override
    public List<SaleOrderDeliveryDetailEntity> selectSaleOrderDeliveryDetailList(SaleOrderDeliveryDetailEntity saleOrderDeliveryDetail)
    {
        return saleOrderDeliveryDetailMapper.selectSaleOrderDeliveryDetailList(saleOrderDeliveryDetail);
    }

    /**
     * 新增销售订单交货明细详情
     * 
     * @param saleOrderDeliveryDetail 销售订单交货明细详情
     * @return 结果
     */
    @Override
    public int insertSaleOrderDeliveryDetail(SaleOrderDeliveryDetailEntity saleOrderDeliveryDetail)
    {
        saleOrderDeliveryDetail.setCreateTime(DateUtils.getNowDate());
        return saleOrderDeliveryDetailMapper.insertSaleOrderDeliveryDetail(saleOrderDeliveryDetail);
    }

    /**
     * 修改销售订单交货明细详情
     * 
     * @param saleOrderDeliveryDetail 销售订单交货明细详情
     * @return 结果
     */
    @Override
    public int updateSaleOrderDeliveryDetail(SaleOrderDeliveryDetailEntity saleOrderDeliveryDetail)
    {
        saleOrderDeliveryDetail.setUpdateTime(DateUtils.getNowDate());
        return saleOrderDeliveryDetailMapper.updateSaleOrderDeliveryDetail(saleOrderDeliveryDetail);
    }

    /**
     * 批量删除销售订单交货明细详情
     * 
     * @param ids 需要删除的销售订单交货明细详情ID
     * @return 结果
     */
    @Override
    public int deleteSaleOrderDeliveryDetailByIds(String[] ids)
    {
        return saleOrderDeliveryDetailMapper.deleteSaleOrderDeliveryDetailByIds(ids);
    }

    /**
     * 删除销售订单交货明细详情信息
     * 
     * @param id 销售订单交货明细详情ID
     * @return 结果
     */
    @Override
    public int deleteSaleOrderDeliveryDetailById(String id)
    {
        return saleOrderDeliveryDetailMapper.deleteSaleOrderDeliveryDetailById(id);
    }
}
